#ifndef PALETTE_H
#define PALETTE_H

#include <SFML/Graphics.hpp>
#include <iostream>
#include <cmath>

#include "globals.h"

class Palette
{
public: 
	Palette( std::vector<sf::Image> &tiles, float left = 0, float top = 0, unsigned int width = 10, unsigned height = 15 );
	Palette( Palette & palette );
	~Palette();
	void setPosition( float left, float top );
	void setWidth( unsigned int width );
	void setHeight( unsigned int height );
	void setInput( sf::Key::Code upKey, sf::Key::Code downKey );
	void input( const sf::Input &input );
	void draw( sf::RenderWindow &app );
private:
	/// holds which place you are in the array of tiles
	std::vector<sf::Image> *tiles;
	sf::Key::Code downInput;
	sf::Key::Code upInput;
	unsigned int index;
	unsigned int endIndex;
	unsigned int width;
	unsigned int height;
	float left;
	float top;
	int numOfTiles;
};

#endif //PALETTE_H